﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BasicData.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class aa : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Accounts",
                columns: table => new
                {
                    AccountId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AccountName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AccountPassword = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Accounts", x => x.AccountId);
                });

            migrationBuilder.CreateTable(
                name: "Cangs",
                columns: table => new
                {
                    CangId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CangName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Cangs", x => x.CangId);
                });

            migrationBuilder.CreateTable(
                name: "Chans",
                columns: table => new
                {
                    ChanId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    GoodsId = table.Column<int>(type: "int", nullable: false),
                    ChanName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ChanNum = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ChanCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CangId = table.Column<int>(type: "int", nullable: false),
                    KuId = table.Column<int>(type: "int", nullable: false),
                    HuoId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Chans", x => x.ChanId);
                });

            migrationBuilder.CreateTable(
                name: "Goods",
                columns: table => new
                {
                    GoodsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    GoodsCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsTitle = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    GoodsName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsPeople = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsDesc = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Goods", x => x.GoodsId);
                });

            migrationBuilder.CreateTable(
                name: "Huo",
                columns: table => new
                {
                    HuoId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HuoName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Huo", x => x.HuoId);
                });

            migrationBuilder.CreateTable(
                name: "Ku",
                columns: table => new
                {
                    KuId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    KuName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Ku", x => x.KuId);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Accounts");

            migrationBuilder.DropTable(
                name: "Cangs");

            migrationBuilder.DropTable(
                name: "Chans");

            migrationBuilder.DropTable(
                name: "Goods");

            migrationBuilder.DropTable(
                name: "Huo");

            migrationBuilder.DropTable(
                name: "Ku");
        }
    }
}
